package com.ang.publishEvent.t1;

import org.springframework.stereotype.Service;
import org.springframework.transaction.event.TransactionalEventListener;

@Service
public class UserHandlerService {
    /**
     * TransactionalEventListener要指定 fallbackExecution
     * @param userInfo
     */
    @TransactionalEventListener(fallbackExecution = true)
//    @EventListener
    public void userHandler(UserInfo1 userInfo){
        System.out.println("----------------------");
        System.out.println(userInfo.toString());
        System.out.println("----------------------");
    }
}
